package com.enterpriseDigitalPlatform.dto;

import com.enterpriseDigitalPlatform.util.IpUtil;
import jakarta.servlet.http.HttpServletRequest;
import lombok.Data;

import java.util.Map;

@Data
public class RequestInfoDTO {
    private Map<String, Object> jwtData;
    private String ip;

    public RequestInfoDTO(HttpServletRequest request) {
        this.jwtData = (Map<String, Object>) request.getAttribute("jwtData");
        this.ip = IpUtil.getIpAddr(request);
    }
}
